home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 22 / CU Amiga Magazine's Super CD-ROM 22 (1998)(EMAP Images)(GB)[!][issue 1998-05].iso / PowerPC / Programming / PPCSmallEiffel / bin_c / compile_to_c8.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-16  |  16.3 KB  |  592 lines

  1. /*
  2. -- ANSI C code generated by :
  3. -- SmallEiffel The GNU Eiffel Compiler -- Release (- 0.82)      --
  4. -- Copyright (C), 1994-98 - LORIA - UHP - CRIN - INRIA - FRANCE --
  5. -- Dominique COLNET and Suzanne COLLIN -    colnet@loria.fr     --
  6. --                 http://www.loria.fr/SmallEiffel              --
  7. */
  8. #include "compile_to_c.h"
  9. /*No:ARRAY[E_REQUIRE].clear_all*/
  10. /*No:ARRAY[E_REQUIRE].set_all_with*/
  11. int r522empty(T522* C){
  12. int R=0;
  13. R=(r522count(C))==(0);
  14. return R;
  15. }
  16. void r522make(T522* C,int a1,int a2){
  17. int _needed=0;
  18. C->_lower=a1;
  19. C->_upper=a2;
  20. _needed=((a2)-(a1))+(1);
  21. /*IF*/if ((_needed)>(0)) {
  22. /*IF*/if (((((T522*)C))->_capacity/*4*/)<(_needed)) {
  23. /*IF*/if (((((T522*)C))->_capacity/*4*/)==(0)) {
  24. C->_storage=calloc(_needed,sizeof(T0*));
  25. }
  26. else {
  27. C->_storage=calloc(_needed,sizeof(T0*));
  28. }
  29. /*FI*/C->_capacity=_needed;
  30. }
  31. else {
  32. /*[IRF3.6clear_all*/{T522* C1=C;
  33. T0* __value=NULL;
  34. /*[IRF3.6set_all_with*/{T522* C2=C1;
  35. T0* c1=__value;
  36. r884set_all_with((((T522*)C2))->_storage/*0*/,c1,((((T522*)C2))->_upper/*8*/)-((((T522*)C2))->_lower/*12*/));
  37. }/*]*/
  38. }/*]*/
  39. }
  40. /*FI*/}
  41. /*FI*/}
  42. int r522fast_has(T522* C,T0* a1){
  43. int R=0;
  44. /*IF*/if ((r522count(C))>(0)) {
  45. R=(r522fast_index_of(C,a1))<=((((T522*)C))->_upper/*8*/);
  46. }
  47. /*FI*/return R;
  48. }
  49. T0* r522item(T522* C,int a1){
  50. T0* R=NULL;
  51. R=((((T522*)C))->_storage/*0*/)[(a1)-((((T522*)C))->_lower/*12*/)];
  52. return R;
  53. }
  54. void r522clear(T522* C){
  55. C->_upper=((((T522*)C))->_lower/*12*/)-(1);
  56. }
  57. /*No:ARRAY[E_REQUIRE].storage*/
  58. /*No:ARRAY[E_REQUIRE].capacity*/
  59. /*No:ARRAY[E_REQUIRE].lower*/
  60. int r522fast_index_of(T522* C,T0* a1){
  61. int R=0;
  62. R=((((T522*)C))->_lower/*12*/)+(r884fast_index_of((((T522*)C))->_storage/*0*/,a1,((((T522*)C))->_upper/*8*/)-((((T522*)C))->_lower/*12*/)));
  63. return R;
  64. }
  65. /*No:ARRAY[E_REQUIRE].put*/
  66. /*No:ARRAY[E_REQUIRE].upper*/
  67. void r522add_last(T522* C,T0* a1){
  68. int _new_capacity=0;
  69. /*IF*/if (((((T522*)C))->_capacity/*4*/)<((r522count(C))+(1))) {
  70. /*IF*/if (((((T522*)C))->_capacity/*4*/)==(0)) {
  71. C->_capacity=16;
  72. C->_storage=calloc((((T522*)C))->_capacity/*4*/,sizeof(T0*));
  73. }
  74. else {
  75. _new_capacity=(2)*((((T522*)C))->_capacity/*4*/);
  76. C->_storage=r884realloc((((T522*)C))->_storage/*0*/,(((T522*)C))->_capacity/*4*/,_new_capacity);
  77. C->_capacity=_new_capacity;
  78. }
  79. /*FI*/}
  80. /*FI*/C->_upper=((((T522*)C))->_upper/*8*/)+(1);
  81. /*[IRF3.6put*/{T522* C1=C;
  82. T0* b1=a1;
  83. int b2=(((T522*)C))->_upper/*8*/;
  84. ((((T522*)C1))->_storage/*0*/)[(b2)-((((T522*)C1))->_lower/*12*/)]=(b1);
  85. }/*]*/
  86. }
  87. int r522count(T522* C){
  88. int R=0;
  89. R=(((((T522*)C))->_upper/*8*/)-((((T522*)C))->_lower/*12*/))+(1);
  90. return R;
  91. }
  92. T0* r522first(T522* C){
  93. T0* R=NULL;
  94. R=r522item(C,(((T522*)C))->_lower/*12*/);
  95. return R;
  96. }
  97. T0* r552item(T552* C,int a1){
  98. T0* R=NULL;
  99. R=((((T552*)C))->_storage/*0*/)[(a1)-((((T552*)C))->_lower/*12*/)];
  100. return R;
  101. }
  102. /*No:ARRAY[RENAME_PAIR].storage*/
  103. /*No:ARRAY[RENAME_PAIR].capacity*/
  104. /*No:ARRAY[RENAME_PAIR].lower*/
  105. /*No:ARRAY[RENAME_PAIR].put*/
  106. /*No:ARRAY[RENAME_PAIR].upper*/
  107. int r552count(T552* C){
  108. int R=0;
  109. R=(((((T552*)C))->_upper/*8*/)-((((T552*)C))->_lower/*12*/))+(1);
  110. return R;
  111. }
  112. void r552add_last(T552* C,T0* a1){
  113. int _new_capacity=0;
  114. /*IF*/if (((((T552*)C))->_capacity/*4*/)<((r552count(C))+(1))) {
  115. /*IF*/if (((((T552*)C))->_capacity/*4*/)==(0)) {
  116. C->_capacity=16;
  117. C->_storage=calloc((((T552*)C))->_capacity/*4*/,sizeof(T0*));
  118. }
  119. else {
  120. _new_capacity=(2)*((((T552*)C))->_capacity/*4*/);
  121. C->_storage=r949realloc((((T552*)C))->_storage/*0*/,(((T552*)C))->_capacity/*4*/,_new_capacity);
  122. C->_capacity=_new_capacity;
  123. }
  124. /*FI*/}
  125. /*FI*/C->_upper=((((T552*)C))->_upper/*8*/)+(1);
  126. /*[IRF3.6put*/{T552* C1=C;
  127. T0* b1=a1;
  128. int b2=(((T552*)C))->_upper/*8*/;
  129. ((((T552*)C1))->_storage/*0*/)[(b2)-((((T552*)C1))->_lower/*12*/)]=(b1);
  130. }/*]*/
  131. }
  132. /*No:FIXED_ARRAY[E_FEATURE].item*/
  133. /*No:FIXED_ARRAY[E_FEATURE].clear*/
  134. /*No:FIXED_ARRAY[E_FEATURE].storage*/
  135. T0* r352twin(T352* C){
  136. T0* R=NULL;
  137. R=malloc(sizeof(*C));
  138. *((T352*)R)=M352;
  139. r352copy(((T352*)R),((T0*)C));
  140. return R;
  141. }
  142. /*No:FIXED_ARRAY[E_FEATURE].capacity*/
  143. void r352copy(T352* C,T0* a1){
  144. int _new_capacity=0;
  145. int _other_upper=0;
  146. _other_upper=(((T352*)((T352*)a1)))->_upper/*8*/;
  147. /*IF*/if ((_other_upper)>=(0)) {
  148. _new_capacity=(_other_upper)+(1);
  149. /*IF*/if (((((T352*)C))->_capacity/*4*/)<(_new_capacity)) {
  150. C->_capacity=_new_capacity;
  151. C->_storage=calloc(_new_capacity,sizeof(T0*));
  152. }
  153.  else if (((((T352*)C))->_capacity/*4*/)>(0)) {
  154. r822clear_all((((T352*)C))->_storage/*0*/,((((T352*)C))->_capacity/*4*/)-(1));
  155. }
  156. /*FI*/r822copy_from((((T352*)C))->_storage/*0*/,(((T352*)((T352*)a1)))->_storage/*0*/,_other_upper);
  157. }
  158.  else if (((((T352*)C))->_capacity/*4*/)>(0)) {
  159. r822clear_all((((T352*)C))->_storage/*0*/,((((T352*)C))->_capacity/*4*/)-(1));
  160. }
  161. /*FI*/C->_upper=_other_upper;
  162. }
  163. void r352with_capacity(T352* C,int a1){
  164. /*IF*/if (((((T352*)C))->_capacity/*4*/)<(a1)) {
  165. C->_storage=calloc(a1,sizeof(T0*));
  166. C->_capacity=a1;
  167. }
  168. /*FI*/C->_upper=-(1);
  169. }
  170. /*No:FIXED_ARRAY[E_FEATURE].put*/
  171. /*No:FIXED_ARRAY[E_FEATURE].upper*/
  172. void r352add_last(T352* C,T0* a1){
  173. int _new_capacity=0;
  174. /*IF*/if ((((((T352*)C))->_upper/*8*/)+(1))<=(((((T352*)C))->_capacity/*4*/)-(1))) {
  175. C->_upper=((((T352*)C))->_upper/*8*/)+(1);
  176. }
  177.  else if (((((T352*)C))->_capacity/*4*/)==(0)) {
  178. C->_storage=calloc(2,sizeof(T0*));
  179. C->_capacity=2;
  180. C->_upper=0;
  181. }
  182. else {
  183. _new_capacity=(2)*((((T352*)C))->_capacity/*4*/);
  184. C->_storage=r822realloc((((T352*)C))->_storage/*0*/,(((T352*)C))->_capacity/*4*/,_new_capacity);
  185. C->_capacity=_new_capacity;
  186. C->_upper=((((T352*)C))->_upper/*8*/)+(1);
  187. }
  188. /*FI*//*[IRF3.5put*/((((T352*)C))->_storage/*0*/)[(((T352*)C))->_upper/*8*/]=(a1);
  189. /*]*/
  190. }
  191. /*No:ARRAY[INDEX_CLAUSE].storage*/
  192. /*No:ARRAY[INDEX_CLAUSE].capacity*/
  193. /*No:ARRAY[INDEX_CLAUSE].lower*/
  194. /*No:ARRAY[INDEX_CLAUSE].put*/
  195. /*No:ARRAY[INDEX_CLAUSE].upper*/
  196. int r848count(T848* C){
  197. int R=0;
  198. R=(((((T848*)C))->_upper/*8*/)-((((T848*)C))->_lower/*12*/))+(1);
  199. return R;
  200. }
  201. void r848add_last(T848* C,T0* a1){
  202. int _new_capacity=0;
  203. /*IF*/if (((((T848*)C))->_capacity/*4*/)<((r848count(C))+(1))) {
  204. /*IF*/if (((((T848*)C))->_capacity/*4*/)==(0)) {
  205. C->_capacity=16;
  206. C->_storage=calloc((((T848*)C))->_capacity/*4*/,sizeof(T0*));
  207. }
  208. else {
  209. _new_capacity=(2)*((((T848*)C))->_capacity/*4*/);
  210. C->_storage=r100realloc((((T848*)C))->_storage/*0*/,(((T848*)C))->_capacity/*4*/,_new_capacity);
  211. C->_capacity=_new_capacity;
  212. }
  213. /*FI*/}
  214. /*FI*/C->_upper=((((T848*)C))->_upper/*8*/)+(1);
  215. /*[IRF3.6put*/{T848* C1=C;
  216. T0* b1=a1;
  217. int b2=(((T848*)C))->_upper/*8*/;
  218. ((((T848*)C1))->_storage/*0*/)[(b2)-((((T848*)C1))->_lower/*12*/)]=(b1);
  219. }/*]*/
  220. }
  221. int r38empty(T38* C){
  222. int R=0;
  223. R=(r38count(C))==(0);
  224. return R;
  225. }
  226. T0* r38item(T38* C,int a1){
  227. T0* R=NULL;
  228. R=((((T38*)C))->_storage/*0*/)[(a1)-((((T38*)C))->_lower/*12*/)];
  229. return R;
  230. }
  231. void r38clear(T38* C){
  232. C->_upper=((((T38*)C))->_lower/*12*/)-(1);
  233. }
  234. /*No:ARRAY[POSITION].storage*/
  235. /*No:ARRAY[POSITION].capacity*/
  236. int r38has(T38* C,T0* a1){
  237. int R=0;
  238. /*IF*/if ((r38count(C))>(0)) {
  239. R=(r38index_of(C,a1))<=((((T38*)C))->_upper/*8*/);
  240. }
  241. /*FI*/return R;
  242. }
  243. /*No:ARRAY[POSITION].lower*/
  244. void r38with_capacity(T38* C,int a1,int a2){
  245. /*IF*/if (((((T38*)C))->_capacity/*4*/)<(a1)) {
  246. C->_storage=calloc(a1,sizeof(T0*));
  247. C->_capacity=a1;
  248. }
  249. /*FI*/C->_lower=a2;
  250. C->_upper=(a2)-(1);
  251. }
  252. /*No:ARRAY[POSITION].put*/
  253. /*No:ARRAY[POSITION].upper*/
  254. void r38add_last(T38* C,T0* a1){
  255. int _new_capacity=0;
  256. /*IF*/if (((((T38*)C))->_capacity/*4*/)<((r38count(C))+(1))) {
  257. /*IF*/if (((((T38*)C))->_capacity/*4*/)==(0)) {
  258. C->_capacity=16;
  259. C->_storage=calloc((((T38*)C))->_capacity/*4*/,sizeof(T0*));
  260. }
  261. else {
  262. _new_capacity=(2)*((((T38*)C))->_capacity/*4*/);
  263. C->_storage=r379realloc((((T38*)C))->_storage/*0*/,(((T38*)C))->_capacity/*4*/,_new_capacity);
  264. C->_capacity=_new_capacity;
  265. }
  266. /*FI*/}
  267. /*FI*/C->_upper=((((T38*)C))->_upper/*8*/)+(1);
  268. /*[IRF3.6put*/{T38* C1=C;
  269. T0* b1=a1;
  270. int b2=(((T38*)C))->_upper/*8*/;
  271. ((((T38*)C1))->_storage/*0*/)[(b2)-((((T38*)C1))->_lower/*12*/)]=(b1);
  272. }/*]*/
  273. }
  274. int r38count(T38* C){
  275. int R=0;
  276. R=(((((T38*)C))->_upper/*8*/)-((((T38*)C))->_lower/*12*/))+(1);
  277. return R;
  278. }
  279. int r38index_of(T38* C,T0* a1){
  280. int R=0;
  281. R=((((T38*)C))->_lower/*12*/)+(r379index_of((((T38*)C))->_storage/*0*/,a1,((((T38*)C))->_upper/*8*/)-((((T38*)C))->_lower/*12*/)));
  282. return R;
  283. }
  284. /*No:ARRAY[RUN_FEATURE_6].clear_all*/
  285. /*No:ARRAY[RUN_FEATURE_6].set_all_with*/
  286. void r365force(T365* C,T0* a1,int a2){
  287. /*IF*/if (((((T365*)C))->_upper/*12*/)<(a2)) {
  288. r365resize(C,(((T365*)C))->_lower/*16*/,a2);
  289. }
  290.  else if ((a2)<((((T365*)C))->_lower/*16*/)) {
  291. r365resize(C,a2,(((T365*)C))->_upper/*12*/);
  292. }
  293. /*FI*//*[IRF3.6put*/{T365* C1=C;
  294. T0* b1=a1;
  295. int b2=a2;
  296. ((((T365*)C1))->_storage/*4*/)[(b2)-((((T365*)C1))->_lower/*16*/)]=(b1);
  297. }/*]*/
  298. }
  299. void r365make(T365* C,int a1,int a2){
  300. int _needed=0;
  301. C->_lower=a1;
  302. C->_upper=a2;
  303. _needed=((a2)-(a1))+(1);
  304. /*IF*/if ((_needed)>(0)) {
  305. /*IF*/if (((((T365*)C))->_capacity/*8*/)<(_needed)) {
  306. /*IF*/if (((((T365*)C))->_capacity/*8*/)==(0)) {
  307. C->_storage=calloc(_needed,sizeof(T0*));
  308. }
  309. else {
  310. C->_storage=calloc(_needed,sizeof(T0*));
  311. }
  312. /*FI*/C->_capacity=_needed;
  313. }
  314. else {
  315. /*[IRF3.6clear_all*/{T365* C1=C;
  316. T0* __value=NULL;
  317. /*[IRF3.6set_all_with*/{T365* C2=C1;
  318. T0* c1=__value;
  319. r692set_all_with((((T365*)C2))->_storage/*4*/,c1,((((T365*)C2))->_upper/*12*/)-((((T365*)C2))->_lower/*16*/));
  320. }/*]*/
  321. }/*]*/
  322. }
  323. /*FI*/}
  324. /*FI*/}
  325. T0* r365item(T365* C,int a1){
  326. T0* R=NULL;
  327. R=((((T365*)C))->_storage/*4*/)[(a1)-((((T365*)C))->_lower/*16*/)];
  328. return R;
  329. }
  330. void r365resize(T365* C,int a1,int a2){
  331. int _mem=0;
  332. int _up=0;
  333. int _i=0;
  334. T0* _other=NULL;
  335. {T365*n=malloc(sizeof(*n));
  336. *n=M365;
  337. r365make(n,a1,a2);
  338. _other=(T0*)n;
  339. }
  340. _i=r2max((((T365*)C))->_lower/*16*/,(((T365*)((T365*)_other)))->_lower/*16*/);
  341. _up=r2min((((T365*)C))->_upper/*12*/,(((T365*)((T365*)_other)))->_upper/*12*/);
  342. while (!((_i)>(_up))) {
  343. /*[IRF3.6put*/{T365* C1=((T365*)_other);
  344. T0* b1=r365item(C,_i);
  345. int b2=_i;
  346. ((((T365*)C1))->_storage/*4*/)[(b2)-((((T365*)C1))->_lower/*16*/)]=(b1);
  347. }/*]*/
  348. _i=(_i)+(1);
  349. }
  350. *((T365*)(C))=*((T365*)(_other));
  351. }
  352. /*No:ARRAY[RUN_FEATURE_6].storage*/
  353. /*No:ARRAY[RUN_FEATURE_6].capacity*/
  354. /*No:ARRAY[RUN_FEATURE_6].lower*/
  355. /*No:ARRAY[RUN_FEATURE_6].put*/
  356. /*No:ARRAY[RUN_FEATURE_6].upper*/
  357. void r365add_last(T365* C,T0* a1){
  358. int _new_capacity=0;
  359. /*IF*/if (((((T365*)C))->_capacity/*8*/)<((r365count(C))+(1))) {
  360. /*IF*/if (((((T365*)C))->_capacity/*8*/)==(0)) {
  361. C->_capacity=16;
  362. C->_storage=calloc((((T365*)C))->_capacity/*8*/,sizeof(T0*));
  363. }
  364. else {
  365. _new_capacity=(2)*((((T365*)C))->_capacity/*8*/);
  366. C->_storage=r692realloc((((T365*)C))->_storage/*4*/,(((T365*)C))->_capacity/*8*/,_new_capacity);
  367. C->_capacity=_new_capacity;
  368. }
  369. /*FI*/}
  370. /*FI*/C->_upper=((((T365*)C))->_upper/*12*/)+(1);
  371. /*[IRF3.6put*/{T365* C1=C;
  372. T0* b1=a1;
  373. int b2=(((T365*)C))->_upper/*12*/;
  374. ((((T365*)C1))->_storage/*4*/)[(b2)-((((T365*)C1))->_lower/*16*/)]=(b1);
  375. }/*]*/
  376. }
  377. int r365count(T365* C){
  378. int R=0;
  379. R=(((((T365*)C))->_upper/*12*/)-((((T365*)C))->_lower/*16*/))+(1);
  380. return R;
  381. }
  382. int r854empty(T854* C){
  383. int R=0;
  384. R=(/*(IRF4.6count*/((((T854*)C))->_upper/*8*/)+(1)/*)*/)==(0);
  385. return R;
  386. }
  387. /*No:FIXED_ARRAY[PARENT].item*/
  388. /*No:FIXED_ARRAY[PARENT].clear*/
  389. /*No:FIXED_ARRAY[PARENT].storage*/
  390. /*No:FIXED_ARRAY[PARENT].capacity*/
  391. T0* r854last(T854* C){
  392. T0* R=NULL;
  393. R=/*(IRF4.6item*/((((T854*)C))->_storage/*0*/)[(((T854*)C))->_upper/*8*/]/*)*/;
  394. return R;
  395. }
  396. void r854with_capacity(T854* C,int a1){
  397. /*IF*/if (((((T854*)C))->_capacity/*4*/)<(a1)) {
  398. C->_storage=calloc(a1,sizeof(T0*));
  399. C->_capacity=a1;
  400. }
  401. /*FI*/C->_upper=-(1);
  402. }
  403. /*No:FIXED_ARRAY[PARENT].put*/
  404. /*No:FIXED_ARRAY[PARENT].upper*/
  405. void r854add_last(T854* C,T0* a1){
  406. int _new_capacity=0;
  407. /*IF*/if ((((((T854*)C))->_upper/*8*/)+(1))<=(((((T854*)C))->_capacity/*4*/)-(1))) {
  408. C->_upper=((((T854*)C))->_upper/*8*/)+(1);
  409. }
  410.  else if (((((T854*)C))->_capacity/*4*/)==(0)) {
  411. C->_storage=calloc(2,sizeof(T0*));
  412. C->_capacity=2;
  413. C->_upper=0;
  414. }
  415. else {
  416. _new_capacity=(2)*((((T854*)C))->_capacity/*4*/);
  417. C->_storage=r304realloc((((T854*)C))->_storage/*0*/,(((T854*)C))->_capacity/*4*/,_new_capacity);
  418. C->_capacity=_new_capacity;
  419. C->_upper=((((T854*)C))->_upper/*8*/)+(1);
  420. }
  421. /*FI*//*[IRF3.5put*/((((T854*)C))->_storage/*0*/)[(((T854*)C))->_upper/*8*/]=(a1);
  422. /*]*/
  423. }
  424. /*No:FIXED_ARRAY[PARENT].count*/
  425. void r854remove_last(T854* C){
  426. C->_upper=((((T854*)C))->_upper/*8*/)-(1);
  427. }
  428. T0* r26item(T26* C,int a1){
  429. T0* R=NULL;
  430. R=((((T26*)C))->_storage/*0*/)[(a1)-((((T26*)C))->_lower/*12*/)];
  431. return R;
  432. }
  433. /*No:ARRAY[PARENT].storage*/
  434. /*No:ARRAY[PARENT].capacity*/
  435. /*No:ARRAY[PARENT].lower*/
  436. /*No:ARRAY[PARENT].put*/
  437. /*No:ARRAY[PARENT].upper*/
  438. int r26count(T26* C){
  439. int R=0;
  440. R=(((((T26*)C))->_upper/*8*/)-((((T26*)C))->_lower/*12*/))+(1);
  441. return R;
  442. }
  443. void r26add_last(T26* C,T0* a1){
  444. int _new_capacity=0;
  445. /*IF*/if (((((T26*)C))->_capacity/*4*/)<((r26count(C))+(1))) {
  446. /*IF*/if (((((T26*)C))->_capacity/*4*/)==(0)) {
  447. C->_capacity=16;
  448. C->_storage=calloc((((T26*)C))->_capacity/*4*/,sizeof(T0*));
  449. }
  450. else {
  451. _new_capacity=(2)*((((T26*)C))->_capacity/*4*/);
  452. C->_storage=r304realloc((((T26*)C))->_storage/*0*/,(((T26*)C))->_capacity/*4*/,_new_capacity);
  453. C->_capacity=_new_capacity;
  454. }
  455. /*FI*/}
  456. /*FI*/C->_upper=((((T26*)C))->_upper/*8*/)+(1);
  457. /*[IRF3.6put*/{T26* C1=C;
  458. T0* b1=a1;
  459. int b2=(((T26*)C))->_upper/*8*/;
  460. ((((T26*)C1))->_storage/*0*/)[(b2)-((((T26*)C1))->_lower/*12*/)]=(b1);
  461. }/*]*/
  462. }
  463. T0* r26first(T26* C){
  464. T0* R=NULL;
  465. R=r26item(C,(((T26*)C))->_lower/*12*/);
  466. return R;
  467. }
  468. T0* r587item(T587* C,int a1){
  469. T0* R=NULL;
  470. R=((((T587*)C))->_storage/*0*/)[(a1)-((((T587*)C))->_lower/*12*/)];
  471. return R;
  472. }
  473. /*No:ARRAY[EXPORT_ITEM].storage*/
  474. /*No:ARRAY[EXPORT_ITEM].capacity*/
  475. /*No:ARRAY[EXPORT_ITEM].lower*/
  476. /*No:ARRAY[EXPORT_ITEM].put*/
  477. /*No:ARRAY[EXPORT_ITEM].upper*/
  478. int r587count(T587* C){
  479. int R=0;
  480. R=(((((T587*)C))->_upper/*8*/)-((((T587*)C))->_lower/*12*/))+(1);
  481. return R;
  482. }
  483. void r587add_last(T587* C,T0* a1){
  484. int _new_capacity=0;
  485. /*IF*/if (((((T587*)C))->_capacity/*4*/)<((r587count(C))+(1))) {
  486. /*IF*/if (((((T587*)C))->_capacity/*4*/)==(0)) {
  487. C->_capacity=16;
  488. C->_storage=calloc((((T587*)C))->_capacity/*4*/,sizeof(T0*));
  489. }
  490. else {
  491. _new_capacity=(2)*((((T587*)C))->_capacity/*4*/);
  492. C->_storage=r44realloc((((T587*)C))->_storage/*0*/,(((T587*)C))->_capacity/*4*/,_new_capacity);
  493. C->_capacity=_new_capacity;
  494. }
  495. /*FI*/}
  496. /*FI*/C->_upper=((((T587*)C))->_upper/*8*/)+(1);
  497. /*[IRF3.6put*/{T587* C1=C;
  498. T0* b1=a1;
  499. int b2=(((T587*)C))->_upper/*8*/;
  500. ((((T587*)C1))->_storage/*0*/)[(b2)-((((T587*)C1))->_lower/*12*/)]=(b1);
  501. }/*]*/
  502. }
  503. /*No:ARRAY[MANIFEST_STRING].clear_all*/
  504. /*No:ARRAY[MANIFEST_STRING].set_all_with*/
  505. void r381make(T381* C,int a1,int a2){
  506. int _needed=0;
  507. C->_lower=a1;
  508. C->_upper=a2;
  509. _needed=((a2)-(a1))+(1);
  510. /*IF*/if ((_needed)>(0)) {
  511. /*IF*/if (((((T381*)C))->_capacity/*8*/)<(_needed)) {
  512. /*IF*/if (((((T381*)C))->_capacity/*8*/)==(0)) {
  513. C->_storage=calloc(_needed,sizeof(T0*));
  514. }
  515. else {
  516. C->_storage=calloc(_needed,sizeof(T0*));
  517. }
  518. /*FI*/C->_capacity=_needed;
  519. }
  520. else {
  521. /*[IRF3.6clear_all*/{T381* C1=C;
  522. T0* __value=NULL;
  523. /*[IRF3.6set_all_with*/{T381* C2=C1;
  524. T0* c1=__value;
  525. r729set_all_with((((T381*)C2))->_storage/*4*/,c1,((((T381*)C2))->_upper/*12*/)-((((T381*)C2))->_lower/*16*/));
  526. }/*]*/
  527. }/*]*/
  528. }
  529. /*FI*/}
  530. /*FI*/}
  531. T0* r381item(T381* C,int a1){
  532. T0* R=NULL;
  533. R=((((T381*)C))->_storage/*4*/)[(a1)-((((T381*)C))->_lower/*16*/)];
  534. return R;
  535. }
  536. /*No:ARRAY[MANIFEST_STRING].storage*/
  537. T0* r381twin(T381* C){
  538. T0* R=NULL;
  539. R=malloc(sizeof(*C));
  540. *((T381*)R)=M381;
  541. r381copy(((T381*)R),((T0*)C));
  542. return R;
  543. }
  544. /*No:ARRAY[MANIFEST_STRING].capacity*/
  545. void r381copy(T381* C,T0* a1){
  546. int _needed_capacity=0;
  547. C->_lower=(((T381*)((T381*)a1)))->_lower/*16*/;
  548. C->_upper=(((T381*)((T381*)a1)))->_upper/*12*/;
  549. _needed_capacity=(((((T381*)C))->_upper/*12*/)-((((T381*)C))->_lower/*16*/))+(1);
  550. /*IF*/if (((((T381*)C))->_capacity/*8*/)<(_needed_capacity)) {
  551. C->_capacity=_needed_capacity;
  552. C->_storage=calloc((((T381*)C))->_capacity/*8*/,sizeof(T0*));
  553. }
  554. /*FI*//*IF*/if ((_needed_capacity)>(0)) {
  555. r729copy_from((((T381*)C))->_storage/*4*/,(((T381*)((T381*)a1)))->_storage/*4*/,(_needed_capacity)-(1));
  556. }
  557. /*FI*/}
  558. /*No:ARRAY[MANIFEST_STRING].lower*/
  559. /*No:ARRAY[MANIFEST_STRING].put*/
  560. /*No:ARRAY[MANIFEST_STRING].upper*/
  561. int r381count(T381* C){
  562. int R=0;
  563. R=(((((T381*)C))->_upper/*12*/)-((((T381*)C))->_lower/*16*/))+(1);
  564. return R;
  565. }
  566. void r381add_last(T381* C,T0* a1){
  567. int _new_capacity=0;
  568. /*IF*/if (((((T381*)C))->_capacity/*8*/)<((r381count(C))+(1))) {
  569. /*IF*/if (((((T381*)C))->_capacity/*8*/)==(0)) {
  570. C->_capacity=16;
  571. C->_storage=calloc((((T381*)C))->_capacity/*8*/,sizeof(T0*));
  572. }
  573. else {
  574. _new_capacity=(2)*((((T381*)C))->_capacity/*8*/);
  575. C->_storage=r729realloc((((T381*)C))->_storage/*4*/,(((T381*)C))->_capacity/*8*/,_new_capacity);
  576. C->_capacity=_new_capacity;
  577. }
  578. /*FI*/}
  579. /*FI*/C->_upper=((((T381*)C))->_upper/*12*/)+(1);
  580. /*[IRF3.6put*/{T381* C1=C;
  581. T0* b1=a1;
  582. int b2=(((T381*)C))->_upper/*12*/;
  583. ((((T381*)C1))->_storage/*4*/)[(b2)-((((T381*)C1))->_lower/*16*/)]=(b1);
  584. }/*]*/
  585. }
  586. T0* r381first(T381* C){
  587. T0* R=NULL;
  588. R=r381item(C,(((T381*)C))->_lower/*16*/);
  589. return R;
  590. }
  591.  
  592.